package com.atkxp.stustatusmasystem.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author user
 * @declaration
 * @create 2023/5/25-20:49
 */
@Controller
public class UserController {
    @RequestMapping("/toStuLogin")
//    @ResponseBody
    public String toStuLogin() {
        return "loginstu";
    }

    @RequestMapping("/toTeaLogin")
    public String toTeaLogin() {
        return "logintea";
    }

    @RequestMapping("logout")
    public String toLogout(HttpServletRequest req) {
        req.getSession().invalidate();
        return "redirect:/";
    }

}
